package io.gitee.chearnee.fw.datasecurity.sd.extension.ruleimpl;

import io.gitee.chearnee.fw.common.utils.ConstStringPool;
import io.gitee.chearnee.fw.datasecurity.core.handler.desensitization.SDRuleHandler;
import io.gitee.chearnee.fw.datasecurity.sd.extension.annotation.SDDateTimeField;

/**
 * @author cn
 * @version 1.0
 * @description
 * @date 11/22/2022 11:18 AM
 */
public class DateTimeRuleHandler implements SDRuleHandler<SDDateTimeField> {
    @Override
    public Class<SDDateTimeField> getAnnotationType() {
        return SDDateTimeField.class;
    }

    @Override
    public String masking(SDDateTimeField sdIdCardField, String object) {
        return baseEgMasking(sdIdCardField.eg(), ConstStringPool.MASK_STRING, object);
    }
}
